﻿using UnityEngine;
using System.Collections;

public enum EBattleWaitStatus
{
	None,
	//BattlePawn에서 기다리는 경우//
	AttackTargetReady,
	AttackTurnEnd,
	SupportDefEnd,
	SupportAtkAllEnd,
	RageSkillAllPawnIdle,
	SkillTargetReady,
	SkillPlayEnd,

	//BattleManager에서 기다리는 경우//
	OverDriveAllPawnIdle,
	OverDrive,
	IdleWaiting,
	ActionComplete,
}

//배틀 진행중 while문으로 기다리는 상황 체크 용도//
public class BattleStatusCheck : MonoBehaviour {

	public BattlePawn curPawn;
	public BattlePawn targetPawn;
	public EBattleWaitStatus waitStatus = EBattleWaitStatus.None;

	public BattlePawn curRoutinePawn;
	public EBattleWaitStatus routineWaitStatus = EBattleWaitStatus.None;

	//BattlePawn에서 기다리는 경우 사용//
	public void SetWaitStatus(EBattleWaitStatus _waitStatus, BattlePawn _pawn)
	{
		SetWaitStatus(_waitStatus, _pawn, null);
	}

	public void SetWaitStatus(EBattleWaitStatus _waitStatus, BattlePawn _pawn, BattlePawn _target)
	{
		waitStatus = _waitStatus;
		curPawn = _pawn;
		targetPawn = _target;
	}

	public void ClearWaitStatus()
	{
		SetWaitStatus(EBattleWaitStatus.None, null);
	}

	//BattleManager에서 기다리는 경우 사용//
	public void SetRoutineWaitStatus(EBattleWaitStatus _waitStatus, BattlePawn _pawn)
	{
		routineWaitStatus = _waitStatus;
		curRoutinePawn = _pawn;
	}

	public void ClearRoutineWaitStatus()
	{
		routineWaitStatus = EBattleWaitStatus.None;
		curRoutinePawn = null;
	}
}
